Skip to content

Conversation

@pokey
Copy link
Contributor

@pokey pokey commented Oct 3, 2025

This allows us to pass things like headers and container to the model call

Matches the setting of the same name in Python

@changeset-bot
Copy link

changeset-bot bot commented Oct 3, 2025

⚠️ No Changeset found

Latest commit: 705f4a1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 3, 2025

@pokey is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Updated (UTC)
langchainjs-docs Ignored Ignored Oct 14, 2025 11:19am

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Let's sync with the Python team on the new property on ModelRequest

@pokey
Copy link
Contributor Author

pokey commented Oct 7, 2025

As discussed with @eyurtsev, we're holding off on merging this one until we look into Python version

/**
* Extra call options to pass to the model.
*/
callOptions?: Record<string, unknown>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @christian-bromann / @pokey is this a standard name in js?

@sydney-runkle this is extra config that we'll be passing to chat model invoke. We can either use the same standard name if it makes sense or follow whatever is convention in each language.

  • extra_params
  • invoke_kwargs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be more specific here I would suggest modelCallOptions as an alternative.

@pokey pokey force-pushed the pokey/featlangchaincreateagent-add-support-for-calloptions-to-middleware branch from d22caf0 to 041bf6a Compare October 14, 2025 11:16
@pokey pokey changed the title feat(langchain/createAgent): Add support for callOptions to middleware feat(langchain/createAgent): Add support for modelSettings to middleware Oct 14, 2025
@pokey
Copy link
Contributor Author

pokey commented Oct 14, 2025

As proposed in Slack, I've switched to just implementing modelSettings as we have in Python. This version works fine for my use case

@hntrl hntrl merged commit 0e55cef into langchain-ai:v1 Oct 15, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants